package com.huangfu.learning.javabase.java.restructure.polymorphicreplaceswitch.polymorphic;

/**
 * Created with IntelliJ IDEA.
 * Author: huangfu.daohui
 * Date: 2018/11/13
 * Time: 10:49
 * Version: 1.0
 * Description:员工
 **/
public class EmployeeNew {

    static final int salary = 500; //薪资
    static final int commission = 500; //提成
    static final int bonus = 1000; //奖金

    EmployeeType employeeType; // 员工类型

    // 设置员工类型
    public void setEmployeeType(EmployeeType employeeType) {
        this.employeeType = employeeType;
    }

    // 支付薪资
    int payAmount() {
        return employeeType.payAmount();
    }

}
